<!DOCTYPE html>
<html lang="zh-cn">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <title>设备信息</title>
  <link rel="icon" href="favicon.ico">
  <script src="https://pv.sohu.com/cityjson?ie=utf-8"></script>
</head>

<body>
  <div class="p"></div>
  <div class="table"></div>
</body>
<script>
  var pbox = document.querySelector(".p")
  var tablebox = document.querySelector(".table")
  pbox.innerHTML = "IP地址: " + returnCitySN['cip'] + "<br><br>"
  +"地区代码: " + returnCitySN['cid'] + "<br><br>"
  +"所在地: " + returnCitySN['cname'] + "<br><br>"
  +"用户表头: " + navigator.userAgent + "<br><br>"
  +"设备名称: " + navigator.appName + "<br><br>"
  +"设备代码: " + navigator.appCodeName + "<br><br>"
  +"版本信息: " + navigator.appVersion + "<br><br>"
  +"次要版本: " + navigator.appMinorVersion + "<br><br>"
  +"硬件平台: " + navigator.platform + "<br><br>"
  +"是否开启cookie: " + navigator.cookieEnabled + "<br><br>"
  +"是否在线: " + navigator.onLine + "<br><br>"
  +"用户语言: " + navigator.language + "<br><br>";
  var pluginsLength = navigator.plugins.length;
  if(pluginsLength > 0){
    tablebox.innerHTML = pluginsLength + " 个浏览器插件<br>" + '<table id="pluginTable" style="width:100%"><thead>' + '<tr><th>插件名称</th><th>文件名</th><th>描述</th><th>版本</th></tr>' + '</thead><tbody></tbody></table>';
    var table = document.getElementById('pluginTable');
    for(var i = 0; i < pluginsLength; i++) {
      let newRow = table.insertRow();
      newRow.insertCell().textContent = navigator.plugins[i].name;
      newRow.insertCell().textContent = navigator.plugins[i].filename;
      newRow.insertCell().textContent = navigator.plugins[i].description;
      newRow.insertCell().textContent = navigator.plugins[i].version?navigator.plugins[i].version:"";
    }
  }
</script>
</html>
